#include <iostream>
using namespace std;
#include "tcpserver.hpp"
#include <memory>

void usage(const char *proname)
{
    cerr << "Usage:\n\t";
    cerr << proname << " serverport" << endl;
}

//./tcpserver serverport
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        usage(argv[0]);
        exit(1);
    }

    unique_ptr<tcpserver> sevrerptr(new tcpserver(stoi(argv[1])));
    sevrerptr->start();

    return 0;
}